package chxy.sys.service.impl;

import chxy.sys.model.Birds;
import chxy.sys.mapper.BirdsMapper;
import chxy.sys.service.BirdsService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author SR.Y
 * @since 2021-03-13
 */
@Service
public class BirdsServiceImpl extends ServiceImpl<BirdsMapper, Birds> implements BirdsService {


    @Override
    public boolean create(Birds b) {
        return save(b);
    }


    @Override
    public boolean update(Birds b) {
        return updateById(b);
    }

    @Override
    public boolean delete(Birds b) {

        return removeById(b.getId());
    }

    @Override
    public Page<Birds > list(Integer pageSize, Integer pageNum) {
        Page<Birds > page = new Page<>(pageNum,pageSize);
        return page(page);
    }
}
